package com.homework.week5_2.controller;

import com.homework.week5_2.dao.Jdbc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

@RestController
public class JDBCController {
    @Autowired
    private Jdbc jdbc;

    @GetMapping("/getJdbc")
    public String userList() throws SQLException, ClassNotFoundException {
        jdbc.contextLoads();
        jdbc.jdbc();
        return "success";
    }

}
